package com.hospital.workstation.service;

import com.hospital.common.core.domain.R;
import com.hospital.workstation.domain.MedicationSummary;
import com.hospital.workstation.domain.vo.MedicationSummaryVo;
import com.hospital.workstation.domain.bo.MedicationSummaryBo;
import com.hospital.common.core.page.TableDataInfo;
import com.hospital.common.core.domain.PageQuery;

import javax.servlet.http.HttpServletResponse;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * 药历小结信息Service接口
 *
 * @author hospital
 * @date 2023-02-16
 */
public interface IMedicationSummaryService {

    /**
     * 查询药历小结信息
     */
    MedicationSummaryVo queryById(Long id);

    /**
     * 查询药历小结信息列表
     */
    TableDataInfo<MedicationSummaryVo> queryPageList(MedicationSummaryBo bo, PageQuery pageQuery);

    /**
     * 查询药历小结信息列表
     */
    List<MedicationSummaryVo> queryList(MedicationSummaryBo bo);

    /**
     * 新增药历小结信息
     */
    R<Void> insertByBo(MedicationSummaryBo bo);

    /**
     * 修改药历小结信息
     */
    Boolean updateByBo(MedicationSummaryBo bo);

    /**
     * 校验并批量删除药历小结信息信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    /**
     * 根据病历号查询药历小结信息
     *
     * @param medicalRecordNo 病历号
     * @return
     */
    MedicationSummaryVo queryByMedicalRecordNo(Integer medicalRecordNo);

    /**
     * 下载药学监护小结
     *
     * @param response
     * @param medicalRecordNo 药历号
     */
    void exportPharmaceuticalCareSummary(HttpServletResponse response, Integer medicalRecordNo);

    /**
     * 获取药历小结map数据
     *
     * @param medicalRecordNo 药历号
     * @return
     */
    Map<String, Object> getPharmaceuticalCareSummaryMap(Integer medicalRecordNo);

    /**
     * 完成并存档药历
     *
     * @param medicalRecordNo 流水号
     * @return
     */
    R<Void> setSubmitState(Integer medicalRecordNo);
}
